import request from './request'
import { useUserStore } from "../store/modules/user"
//获取商家余额
export function getFactoryBalance() {
    let token = {
        [useUserStore().row.tokenName]: useUserStore().token
    }
    return request({
        url: '/factory/getFactoryBalance',
        method: 'get',
        headers: token
    })
}

// 获取累计充值
export function getTotalRecharge() {
    let token = {
        [useUserStore().row.tokenName]: useUserStore().token
    }
    return request({
        url: '/factory/recharge/getTotalRecharge',
        method: 'get',
        headers: token,
    })
}
// 获取月账单概览
export function getMonthBillOverviewList() {
    let token = {
        [useUserStore().row.tokenName]: useUserStore().token
    }
    return request({
        url: '/factory/order/deduction/bill/getMonthBillOverviewList',
        method: 'get',
        headers: token,
    })
}
// 获取账单明细列表
export function getListFactory(data) {
    let token = {
        [useUserStore().row.tokenName]: useUserStore().token
    }
    return request({
        url: '/factory/order/deduction/bill/getList',
        method: 'post',
        headers: token,
        data
    })
}
// 获取占用金额列表
export function getFreezeList(data) {
    let token = {
        [useUserStore().row.tokenName]: useUserStore().token
    }
    return request({
        url: '/work/total/fee/freeze/getFreezeList',
        method: 'post',
        headers: token,
        data
    })
}
// 获取占用详情
export function getFreezeDetail(id) {
    let token = {
        [useUserStore().row.tokenName]: useUserStore().token
    }
    return request({
        url: '/work/total/fee/freeze/getFreezeDetail/'+id,
        method: 'get',
        headers: token,
    })
}
// 获取释放金额列表
export function getUnfreezeList(data) {
    let token = {
        [useUserStore().row.tokenName]: useUserStore().token
    }
    return request({
        url: '/work/total/fee/freeze/getUnfreezeList',
        method: 'post',
        headers: token,
        data
    })
}
// 获取释放详情
export function getUnfreezeDetail(id) {
    let token = {
        [useUserStore().row.tokenName]: useUserStore().token
    }
    return request({
        url: '/work/total/fee/freeze/getUnfreezeDetail/'+id,
        method: 'get',
        headers: token,
    })
}